package org.example.cloud.controller;

import jakarta.annotation.Resource;
import org.example.cloud.api.PayFeignApi;
import org.example.cloud.util.ResultData;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.time.ZonedDateTime;

/**
 * @author 宋孟林
 * @description
 * @date: 2025/4/8 16:38
 */
@RestController
public class OrderGateWayController {
    @Resource
    private PayFeignApi payFeignApi;
    @GetMapping("/pay/gateway/get/{id}")
    public ResultData<?> getById(@PathVariable("id") Integer id){
        return payFeignApi.getById(id);
    }

    @GetMapping("/pay/gateway/info")
    public ResultData<String> getGateWayInfo(){
        return payFeignApi.getGatewayInfo();
    }

    /**
     * 获取当前时区的时间
     * @param args 启动参数
     */
    public static void main(String[] args) {
        ZonedDateTime zonedDateTime = ZonedDateTime.now();
        System.out.println("zonedDateTime = " + zonedDateTime);
    }

}
